home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 22 / Cream of the Crop 22.iso / os2 / is_is_20.zip / IS.TXT < prev    next >
Text File  |  1996-10-04  |  4KB  |  134 lines

  1.  
  2.                                    An
  3.                     ┌┐ ┌┬─┐ ┐ ┌─┬┬─┐ ┌┬──┐ ┌┐    ┌┬──┐ ┌┬──┐
  4.                     ├┤ ├┤ │ │   ├┤   ├┼─   ├┤    ├┼─   ├┤
  5.                     └┘ └┘ └─┘   └┘   └┴──┘ └┴──┘ └┴──┘ └┴──┘
  6.               ┌┬──┐  ┌┬──┐ ┌┬──┐ ┌─┬┬─┐ ┌┐   ┐  ┌┬─┐  ┌┬─┐  ┌┬──┐
  7.               └┴─┬┐  ├┤  │ ├┼─     ├┤   ├┤ ┐ │ ┌┼┴─┴┐ ├┼─┴┐ ├┼─
  8.               └──┴┘  └┴──┘ └┘      └┘   └┴─┴─┘ └┘   ┘ └┘  ┘ └┴──┘
  9.                         ┌┬──┐ ┌┐ ┌┐ ┌─┬┬─┐ ┌┬─┐   ┌┬─┐  
  10.                         ├┼─   └┼─┼┘   ├┤   ├┼─┴┐ ┌┼┴─┴┐ 
  11.                         └┴──┘ └┘ └┘   └┘   └┘  ┘ └┘   ┘ 
  12.  
  13.                          IS/IS2.EXE Filesize Checker
  14.                                  *FREEWARE* 
  15.  
  16.  
  17. This program is freeware and may be distributed freely, as long as all files
  18. are included. I do retain all copyrights. It may not be disassembled or 
  19. altered in any way without my expressed written permission.
  20.  
  21.  
  22. Included Files
  23. ==============
  24.  
  25. IS.EXE              DOS Executable
  26. IS2.EXE             OS/2 Executable
  27. IS.TXT              This file
  28. HISTORY.TXT         History of changes
  29. FILE_ID.DIZ         BBS Description file
  30. AVEXTRA.TXT         Other Intelec Software Programs
  31. REGISTER.TXT        How to register our shareware
  32. NEWKEYS.TXT         More info for our shareware programs
  33.  
  34. If all of the above files aren't included in the archive, you 
  35. have an altered archive and no guarantees will be made about the
  36. contents.
  37.  
  38.  
  39. WHAT IT DOES
  40. ============
  41.  
  42. IS compares a files actual size against a given size, and returns
  43. an errorlevel based on that comparison. This allows you to do batch
  44. processing based on a file's size.
  45.  
  46.  
  47. INSTALLATION
  48. ============
  49.  
  50. Extract the files to a directory, preferably one located in your path
  51. (place the DOS EXE in your DOS path, and the OS/2 EXE in your OS2 path)
  52. That's it!
  53.  
  54.  
  55. USAGE
  56. =====
  57.  
  58. To use the utility in a BAT/CMD file, the syntax is:
  59.  
  60. IS  filename size [-!]
  61.  
  62. filename = path\filename of the file to check
  63.            the filename MUST come before the size.
  64.  
  65. size     = max. size of file before returning bad errorlevel (see errorlevels)
  66.            size should be given in Kilobytes (1 = 1K)
  67.  
  68. -!       = if this optional parameter is given, it turns on debug mode
  69.            and additional information will be displayed.
  70.  
  71. run the utility with no parameters for a help display.
  72.  
  73. ERRORLEVELS
  74. ===========
  75.  
  76. The utility returns one of three possible errorlevels:
  77.  
  78. 0 - File was under the indicated size
  79. 1 - File doesn't exist
  80. 2 - File was over the indicated size
  81.  
  82. By testing the errorlevel, you can take actions according to it's size
  83. (even whether or not it exists). See (Examples) 
  84.  
  85. LOGGING
  86. =======
  87.  
  88. All output is sent to Standard Output and may be redirected to a file
  89. which can be used to keep a log. See (Examples)
  90.  
  91. EXAMPLES
  92. ========
  93.  
  94. The following are several example batch file command lines and their
  95. explanations. Note that errorlevels must be checked it descending
  96. order for them to evaluate properly:
  97.  
  98. #1
  99.     IS C:\INTELEC.REP 20
  100.     IF ERRORLEVEL 2 GOTO TOOBIG
  101.  
  102.     Checks whether the file is larger than 20K and jumps to the label
  103.     TOOBIG if it is.
  104.  
  105. #2  
  106.     IS C:\SOMEFILE.ZIP 50
  107.     IF ERRORLEVEL 2 GOTO LARGE
  108.     IF ERRORLEVEL 1 GOTO NOTTHERE
  109.     IF ERRORLEVEL 0 GOTO SMALL
  110.  
  111.     Checks whether the file is larger than 50K. If it is, it jumps to
  112.     the label LARGE. If the file doesn't exist, it jumps to another
  113.     label. If it isn't, it jumps to a third label.
  114.  
  115. #3
  116.     IS C:\FLAGS\ANOTHER.FLG 1
  117.     IF ERRORLEVEL 1 NOT ERRORLEVEL 2 GOTO MISSING
  118.  
  119.     This example shows a what to test for the existance of a file
  120.     (though IF EXIST works as well). Notice the stacjed method of
  121.     using the errorlevel commands to catch a specific errorlevel.
  122.  
  123.  
  124.  #4
  125.     IS SOME.ZIP 10 -!>>c:\logs\is.log
  126.     IF ERRORLEVEL 2 REN SOME.ZIP SOME.BIG
  127.  
  128.     This example checks that the file is less than 10K, turns 
  129.     debugging mode on to display additional information, and
  130.     redirects all output to a file.
  131.  
  132.  
  133.  
  134.